import request from '@/utils/request'

// 获取所有信息
export function getList(query) {
  return request({
    url: '/room/getList.do',
    method: 'post',
    data: query
  })
}
// 新增列
export function addField(form) {
  return request({
    url: '/room/addField.do',
    method: 'post',
    data: form
  })
}
// 删除列
export function delField(lineuuid) {
  return request({
    url: '/room/delField.do?line_uuid=' + lineuuid,
    method: 'get'
  })
}
// 修改列名 line_uuid value
export function updateFieldName(params) {
  return request({
    url: '/room/updateFieldName.do?line_uuid=' + params[0] + '&value=' + params[1],
    method: 'get'
  })
}
// 修改下拉框
export function updateSelect(params) {
  return request({
    url: '/room/updateSelect.do',
    method: 'post',
    data: params
  })
}
// 修改下拉框长度
export function updateTextLength(params) {
  return request({
    url: '/room/updateTextLength.do',
    method: 'post',
    data: params
  })
}
// 添加行数据
export function insertRowValue(params) {
  return request({
    url: '/room/insertResource.do',
    method: 'post',
    data: params
  })
}
// 删除行数据
export function delRowValue(params) {
  return request({
    url: '/room/recycleRoom.do',
    method: 'post',
    data: params
  })
}
// 修改行数据
export function updateRowValue(params) {
  return request({
    url: '/room/updateRoom.do',
    method: 'post',
    data: params
  })
}
// 资产入账
export function roomIn(params) {
  return request({
    url: '/room/roomIn.do',
    method: 'post',
    data: params
  })
}
// 资产出账
export function roomOut(params) {
  return request({
    url: '/room/roomOut.do',
    method: 'post',
    data: params
  })
}

// 获取到租金合同详情
export function getChartInfoRoom(params) {
  return request({
    url: '/hireList/getChartInfoRoom.do',
    method: 'post',
    data: params
  })
}
// 替换关键字,并调用预览
export function rentlook(params) {
  return request({
    url: '/convert/acquireData.do',
    method: 'post',
    data: params
  })
}

// 所有分组
export function getAllByCompanyGuid(params) {
  return request({
    url: '/group/getAllByCompanyGuid.do',
    method: 'post',
    data: params
  })
}

// 增加新分组
export function addGroup(params) {
  return request({
    url: '/group/addGroup.do',
    method: 'post',
    data: params
  })
}
// 增加资产进分组
export function addRoomGroup(params) {
  return request({
    url: '/group/addRoomGroup.do',
    method: 'post',
    data: params
  })
}
// 从分组移除资产
export function delRoomGroup(params) {
  return request({
    url: '/group/delRoomGroup.do',
    method: 'post',
    data: params
  })
}
// 修改分组
export function updageGroupByGuid(params) {
  return request({
    url: '/group/updageGroupByGuid.do',
    method: 'post',
    data: params
  })
}
// 删除分组
export function deleteByGroupGuid(params) {
  return request({
    url: '/group/deleteByGroupGuid.do',
    method: 'post',
    data: params
  })
}

// 查询 groupGuid
export function selectByGroupGuid(params) {
  return request({
    url: '/group/selectByGroupGuid.do',
    method: 'post',
    data: params
  })
}
